package com.cg.controller;

import com.cg.dto.Result;
import com.cg.dto.ResultUtils;
import com.cg.entity.DictionaryType;
import com.cg.service.DictionaryTypeService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * (DictionaryType)表控制层
 *
 * @author chengong
 * @since 2024-01-09 20:52:51
 */
@RestController
@RequestMapping("/dictionaryType")
public class DictionaryTypeController {
    /**
     * 服务对象
     */
    @Resource
    private DictionaryTypeService dictionaryTypeService;

    /**
     * 查询全部数据字典类型
     */
    @GetMapping("/queryTypeCodeAll")
    public Result<List<DictionaryType>> queryTypeCodeAll() {
        List<DictionaryType> dictionaryTypes = dictionaryTypeService.queryTypeCodeAll();
        return ResultUtils.returnDataSuccess(dictionaryTypes);
    }

}

